package base.thread_JUC2.chapter01.demo012;

public class TestCase {
    public static void main(String[] args) {
        MyThreadFactory factory=new MyThreadFactory("MyThreadFactory");
        // Creates a task
        Task task=new Task();
        Thread thread;

        System.out.printf("Starting the Threads\n");
        for (int i=0; i<10; i++){
            thread=factory.newThread(task);
            thread.start();
        }
        // Prints the statistics of the ThreadFactory to the console
        System.out.printf("Factory stats:\n");
        System.out.printf("%s\n",factory.getStats());
    }
}
